﻿<template>
    <el-dialog
        title="修改记录"
        v-model="visible"
        :width="1200"
        destroy-on-close
        :close-on-click-modal="false"
        :before-close="handleBeforeClose"
    >
        <el-form
            :model="entityObj"
            :rules="rules"
            :disabled="mode == 'Show'"
            ref="dialogForm"
            label-width="100px"
        >
            <el-row>
                <el-col :span="6">
                    <el-form-item label-width="120px" label="物料编码" v-if="entityObj.storageOrderType!=4">{{entityObj.materialCode}}</el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label-width="120px" label="物料名称" v-if="entityObj.storageOrderType!=4">{{entityObj.materialName}}</el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label-width="120px" label="物料规格" v-if="entityObj.storageOrderType!=4">{{entityObj.materialSpecs}}</el-form-item>
                </el-col>
                <el-col :span="6">
                    <el-form-item label-width="120px" label="厂家">{{entityObj.supplierFullName}}</el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-table :data="entityObj.storageOrderLogs" border style="width: 100%">
                        <el-table-column label="修改前数量" min-width="110" prop="beforeQty" v-if="entityObj.storageOrderType!=4"></el-table-column>
                        <el-table-column label="修改后数量" min-width="110" prop="afterQty" v-if="entityObj.storageOrderType!=4"></el-table-column>
                        <el-table-column label="修改前价格" min-width="110" prop="beforePrice"></el-table-column>
                        <el-table-column label="修改后价格" min-width="110" prop="afterPrice"></el-table-column>
                        <el-table-column label="备注" min-width="150" prop="remarks"></el-table-column>
                        <el-table-column label="修改人" min-width="130" prop="crName"></el-table-column>
                        <el-table-column label="修改时间" min-width="160" prop="createTime"></el-table-column>
                    </el-table>
                </el-col>
            </el-row>
        </el-form>
    </el-dialog>
</template>



<script>
import tool from "@/utils/tool";
export default {
    emits: ["success", "closed"],
    data() {
        return {
            mode: "Add",
            titleMap: {
                Add: "新增",
                Edit: "编辑",
                Show: "查看",
            },
            entityObj: {},
            supplierState: false,
            applyOrderState: false,
            storeState: false,
            queryList: {},
            visible: false,
            isSaveing: false,
            needSaveFlag: false,
            //验证规则
            rules: {},
            props: {
                label: "supplierName",
                value: "supplierId",
            },
            materialProps: {
                label: "materialCode",
                value: "materialId",
                items: "materialItems",
            },
            materialTypeTree: [],
            optionsBrand: [],
            optionsUnit: [],
            optionsPurchaseUnity: [],
            itemsData: [],
            minDate: "",
            maxDate: "",
        };
    },
    computed: {},
    methods: {
        //显示=
        async open(mode = "Add") {
            this.mode = mode;
            this.visible = true;
            return this;
        },
        //表单注入数据
        async setData(data) {
            this.entityObj = data;
        },
    },
    async mounted() {},
};
</script>

<style></style>
